<template>
  <div class="loading">
    <span></span>
    <span></span>
    <span></span>
    <span></span>
  </div>
</template>

<script>
export default {};
</script>

<style lang="less" scoped>
@keyframes loading {
  from {
    transform: scaleY(1);
  }
  to {
    transform: scaleY(0.2);
  }
}
.loading {
  display: flex;
  justify-content: space-between;
  width: 20px;
  height: 20px;
  margin: 0 auto;
  span {
    width: 15%;
    // flex: 1;
    background: red;
    animation: loading 1s linear infinite alternate;
    transform-origin: bottom;
    &:nth-child(1) {
      animation-delay: -0.75s;
    }
    &:nth-child(2) {
      animation-delay: -0.5s;
    }
    &:nth-child(3) {
      animation-delay: -0.25s;
    }
    &:nth-child(4) {
      animation-delay: 0s;
    }
  }
}
</style>
